// routes/commitRouter.js

const Router = require("@koa/router");
const commitController = require("../controllers/commitController");

const router = new Router();

// 获取所有提交记录
router.get("/commits", commitController.getAllCommits);

// 获取单个提交记录通过id
router.get("/commits/:id", commitController.getCommitById);

// 创建新的提交记录
router.post("/commits", commitController.createCommit);

// 删除提交记录
router.delete("/commits/:id", commitController.deleteCommit);

module.exports = router;
